/*
 * Copyright 2012 The Sainfy Open Software.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.sainfy.jxvs.launcher;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xmpp.component.Component;
import org.xmpp.component.ComponentException;
import org.xmpp.component.ComponentManager;
import org.xmpp.packet.JID;
import org.xmpp.packet.Packet;

import java.io.File;
import java.io.FilenameFilter;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.TimeZone;

import org.Constants;

/**
 * 
* <p>Title: Launcher</p>
* <p>Description: </p>
* <p>Company:lgliushq@163.com </p>
* @author    Liusq
* @date       2014-5-9
 */
public class ChatComponent  implements Component {

	private static final Logger Log = LoggerFactory.getLogger(ChatComponent.class);
	private static final String name="chat"; 
	 private static final String description="实现多人通过组件在区域内聊天";
	 private JID jid;
	 private ComponentManager comMgr;
	 

	 public String getName() { 
		 return name;
	} 
	 
	 public String getDescription() {
		 return description; 
	} 
	 
	 public void processPacket(Packet packet) { 
		 Log.info(packet.toXML()); 
	} 
	 
	 public void initialize(JID jid, ComponentManager componentManager) throws ComponentException {
		 this.jid=jid;
		 this.comMgr=componentManager;
	}
	 
	 public void start() {
		 Log.info("component start"); 
	} 
	 
	 public void shutdown() {
		 Log.info("component shutdown");
	}
    
}
